/*************************************************************/

#ifndef WGL_ARB_pbuffer
DECLARE_HANDLE(HPBUFFERARB);
#endif
#ifndef WGL_EXT_pbuffer
DECLARE_HANDLE(HPBUFFEREXT);
#endif
#ifndef WGL_NV_present_video
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
#endif
#ifndef WGL_NV_video_output
DECLARE_HANDLE(HPVIDEODEV);
#endif
#ifndef WGL_NV_gpu_affinity
DECLARE_HANDLE(HPGPUNV);
DECLARE_HANDLE(HGPUNV);

typedef struct _GPU_DEVICE {
    DWORD  cb;
    CHAR   DeviceName[32];
    CHAR   DeviceString[128];
    DWORD  Flags;
    RECT   rcVirtualScreen;
} GPU_DEVICE, *PGPU_DEVICE;
#endif
#ifndef WGL_NV_video_capture
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
#endif

#define NAME_EMPTY(x)
#define FUNC_EMPTY(x, y, z, w, t)
#define END_EMPTY()
#define CONST_EMPTY(x, y, z)

#ifndef WGL_3DFX_multisample
#define WGL_3DFX_multisample 1
#define EXTENSION_WGL_3DFX_multisample(NAME, FUNC, CONST, END) \
	NAME(WGL_3DFX_multisample) \
	CONST(int, WGL_SAMPLE_BUFFERS_3DFX, 0x2060) \
	CONST(int, WGL_SAMPLES_3DFX, 0x2061) \
	END()
#else
#define EXTENSION_WGL_3DFX_multisample(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_3DL_stereo_control
#define WGL_3DL_stereo_control 1
#define EXTENSION_WGL_3DL_stereo_control(NAME, FUNC, CONST, END) \
	NAME(WGL_3DL_stereo_control) \
	CONST(int, WGL_STEREO_EMITTER_ENABLE_3DL, 0x2055) \
	CONST(int, WGL_STEREO_EMITTER_DISABLE_3DL, 0x2056) \
	CONST(int, WGL_STEREO_POLARITY_NORMAL_3DL, 0x2057) \
	CONST(int, WGL_STEREO_POLARITY_INVERT_3DL, 0x2058) \
	FUNC(BOOL , wglSetStereoEmitterState3DL, WGLSETSTEREOEMITTERSTATE3DL, (HDC hDC , UINT uState ), (hDC, uState)) \
	END()
#else
#define EXTENSION_WGL_3DL_stereo_control(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_AMD_gpu_association
#define WGL_AMD_gpu_association 1
#define EXTENSION_WGL_AMD_gpu_association(NAME, FUNC, CONST, END) \
	NAME(WGL_AMD_gpu_association) \
	CONST(int, WGL_GPU_VENDOR_AMD, 0x1F00) \
	CONST(int, WGL_GPU_RENDERER_STRING_AMD, 0x1F01) \
	CONST(int, WGL_GPU_OPENGL_VERSION_STRING_AMD, 0x1F02) \
	CONST(int, WGL_GPU_FASTEST_TARGET_GPUS_AMD, 0x21A2) \
	CONST(int, WGL_GPU_RAM_AMD, 0x21A3) \
	CONST(int, WGL_GPU_CLOCK_AMD, 0x21A4) \
	CONST(int, WGL_GPU_NUM_PIPES_AMD, 0x21A5) \
	CONST(int, WGL_GPU_NUM_SIMD_AMD, 0x21A6) \
	CONST(int, WGL_GPU_NUM_RB_AMD, 0x21A7) \
	CONST(int, WGL_GPU_NUM_SPI_AMD, 0x21A8) \
	FUNC(UINT , wglGetGPUIDsAMD, WGLGETGPUIDSAMD, (UINT maxCount , UINT * ids ), (maxCount, ids)) \
	FUNC(INT , wglGetGPUInfoAMD, WGLGETGPUINFOAMD, (UINT id , int property , GLenum dataType , UINT size , void * data ), (id, property, dataType, size, data)) \
	FUNC(UINT , wglGetContextGPUIDAMD, WGLGETCONTEXTGPUIDAMD, (HGLRC hglrc ), (hglrc)) \
	FUNC(HGLRC , wglCreateAssociatedContextAMD, WGLCREATEASSOCIATEDCONTEXTAMD, (UINT id ), (id)) \
	FUNC(HGLRC , wglCreateAssociatedContextAttribsAMD, WGLCREATEASSOCIATEDCONTEXTATTRIBSAMD, (UINT id , HGLRC hShareContext , const int * attribList ), (id, hShareContext, attribList)) \
	FUNC(BOOL , wglDeleteAssociatedContextAMD, WGLDELETEASSOCIATEDCONTEXTAMD, (HGLRC hglrc ), (hglrc)) \
	FUNC(BOOL , wglMakeAssociatedContextCurrentAMD, WGLMAKEASSOCIATEDCONTEXTCURRENTAMD, (HGLRC hglrc ), (hglrc)) \
	FUNC(HGLRC , wglGetCurrentAssociatedContextAMD, WGLGETCURRENTASSOCIATEDCONTEXTAMD, (void ), ()) \
	FUNC(VOID , wglBlitContextFramebufferAMD, WGLBLITCONTEXTFRAMEBUFFERAMD, (HGLRC dstCtx , GLint srcX0 , GLint srcY0 , GLint srcX1 , GLint srcY1 , GLint dstX0 , GLint dstY0 , GLint dstX1 , GLint dstY1 , GLbitfield mask , GLenum filter ), (dstCtx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter)) \
	END()
#else
#define EXTENSION_WGL_AMD_gpu_association(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_buffer_region
#define WGL_ARB_buffer_region 1
#define EXTENSION_WGL_ARB_buffer_region(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_buffer_region) \
	CONST(int, WGL_FRONT_COLOR_BUFFER_BIT_ARB, 0x00000001) \
	CONST(int, WGL_BACK_COLOR_BUFFER_BIT_ARB, 0x00000002) \
	CONST(int, WGL_DEPTH_BUFFER_BIT_ARB, 0x00000004) \
	CONST(int, WGL_STENCIL_BUFFER_BIT_ARB, 0x00000008) \
	FUNC(HANDLE , wglCreateBufferRegionARB, WGLCREATEBUFFERREGIONARB, (HDC hDC , int iLayerPlane , UINT uType ), (hDC, iLayerPlane, uType)) \
	FUNC(VOID , wglDeleteBufferRegionARB, WGLDELETEBUFFERREGIONARB, (HANDLE hRegion ), (hRegion)) \
	FUNC(BOOL , wglSaveBufferRegionARB, WGLSAVEBUFFERREGIONARB, (HANDLE hRegion , int x , int y , int width , int height ), (hRegion, x, y, width, height)) \
	FUNC(BOOL , wglRestoreBufferRegionARB, WGLRESTOREBUFFERREGIONARB, (HANDLE hRegion , int x , int y , int width , int height , int xSrc , int ySrc ), (hRegion, x, y, width, height, xSrc, ySrc)) \
	END()
#else
#define EXTENSION_WGL_ARB_buffer_region(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_create_context
#define WGL_ARB_create_context 1
#define EXTENSION_WGL_ARB_create_context(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_create_context) \
	CONST(int, WGL_CONTEXT_DEBUG_BIT_ARB, 0x00000001) \
	CONST(int, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, 0x00000002) \
	CONST(int, WGL_CONTEXT_MAJOR_VERSION_ARB, 0x2091) \
	CONST(int, WGL_CONTEXT_MINOR_VERSION_ARB, 0x2092) \
	CONST(int, WGL_CONTEXT_LAYER_PLANE_ARB, 0x2093) \
	CONST(int, WGL_CONTEXT_FLAGS_ARB, 0x2094) \
	CONST(int, ERROR_INVALID_VERSION_ARB, 0x2095) \
	FUNC(HGLRC , wglCreateContextAttribsARB, WGLCREATECONTEXTATTRIBSARB, (HDC hDC , HGLRC hShareContext , const int * attribList ), (hDC, hShareContext, attribList)) \
	END()
#else
#define EXTENSION_WGL_ARB_create_context(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_create_context_profile
#define WGL_ARB_create_context_profile 1
#define EXTENSION_WGL_ARB_create_context_profile(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_create_context_profile) \
	CONST(int, WGL_CONTEXT_PROFILE_MASK_ARB, 0x9126) \
	CONST(int, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, 0x00000001) \
	CONST(int, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, 0x00000002) \
	CONST(int, ERROR_INVALID_PROFILE_ARB, 0x2096) \
	END()
#else
#define EXTENSION_WGL_ARB_create_context_profile(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_create_context_robustness
#define WGL_ARB_create_context_robustness 1
#define EXTENSION_WGL_ARB_create_context_robustness(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_create_context_robustness) \
	CONST(int, WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB, 0x00000004) \
	CONST(int, WGL_LOSE_CONTEXT_ON_RESET_ARB, 0x8252) \
	CONST(int, WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB, 0x8256) \
	CONST(int, WGL_NO_RESET_NOTIFICATION_ARB, 0x8261) \
	END()
#else
#define EXTENSION_WGL_ARB_create_context_robustness(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_extensions_string
#define WGL_ARB_extensions_string 1
#define EXTENSION_WGL_ARB_extensions_string(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_extensions_string) \
	FUNC(const char * , wglGetExtensionsStringARB, WGLGETEXTENSIONSSTRINGARB, (HDC hdc ), (hdc)) \
	END()
#else
#define EXTENSION_WGL_ARB_extensions_string(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_framebuffer_sRGB
#define WGL_ARB_framebuffer_sRGB 1
#define EXTENSION_WGL_ARB_framebuffer_sRGB(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_framebuffer_sRGB) \
	CONST(int, WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, 0x20A9) \
	END()
#else
#define EXTENSION_WGL_ARB_framebuffer_sRGB(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_make_current_read
#define WGL_ARB_make_current_read 1
#define EXTENSION_WGL_ARB_make_current_read(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_make_current_read) \
	CONST(int, ERROR_INVALID_PIXEL_TYPE_ARB, 0x2043) \
	CONST(int, ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB, 0x2054) \
	FUNC(BOOL , wglMakeContextCurrentARB, WGLMAKECONTEXTCURRENTARB, (HDC hDrawDC , HDC hReadDC , HGLRC hglrc ), (hDrawDC, hReadDC, hglrc)) \
	FUNC(HDC , wglGetCurrentReadDCARB, WGLGETCURRENTREADDCARB, (void ), ()) \
	END()
#else
#define EXTENSION_WGL_ARB_make_current_read(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_multisample
#define WGL_ARB_multisample 1
#define EXTENSION_WGL_ARB_multisample(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_multisample) \
	CONST(int, WGL_SAMPLE_BUFFERS_ARB, 0x2041) \
	CONST(int, WGL_SAMPLES_ARB, 0x2042) \
	END()
#else
#define EXTENSION_WGL_ARB_multisample(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_pbuffer
#define WGL_ARB_pbuffer 1
#define EXTENSION_WGL_ARB_pbuffer(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_pbuffer) \
	CONST(int, WGL_DRAW_TO_PBUFFER_ARB, 0x202D) \
	CONST(int, WGL_MAX_PBUFFER_PIXELS_ARB, 0x202E) \
	CONST(int, WGL_MAX_PBUFFER_WIDTH_ARB, 0x202F) \
	CONST(int, WGL_MAX_PBUFFER_HEIGHT_ARB, 0x2030) \
	CONST(int, WGL_PBUFFER_LARGEST_ARB, 0x2033) \
	CONST(int, WGL_PBUFFER_WIDTH_ARB, 0x2034) \
	CONST(int, WGL_PBUFFER_HEIGHT_ARB, 0x2035) \
	CONST(int, WGL_PBUFFER_LOST_ARB, 0x2036) \
	FUNC(HPBUFFERARB , wglCreatePbufferARB, WGLCREATEPBUFFERARB, (HDC hDC , int iPixelFormat , int iWidth , int iHeight , const int * piAttribList ), (hDC, iPixelFormat, iWidth, iHeight, piAttribList)) \
	FUNC(HDC , wglGetPbufferDCARB, WGLGETPBUFFERDCARB, (HPBUFFERARB hPbuffer ), (hPbuffer)) \
	FUNC(int , wglReleasePbufferDCARB, WGLRELEASEPBUFFERDCARB, (HPBUFFERARB hPbuffer , HDC hDC ), (hPbuffer, hDC)) \
	FUNC(BOOL , wglDestroyPbufferARB, WGLDESTROYPBUFFERARB, (HPBUFFERARB hPbuffer ), (hPbuffer)) \
	FUNC(BOOL , wglQueryPbufferARB, WGLQUERYPBUFFERARB, (HPBUFFERARB hPbuffer , int iAttribute , int * piValue ), (hPbuffer, iAttribute, piValue)) \
	END()
#else
#define EXTENSION_WGL_ARB_pbuffer(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_pixel_format
#define WGL_ARB_pixel_format 1
#define EXTENSION_WGL_ARB_pixel_format(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_pixel_format) \
	CONST(int, WGL_NUMBER_PIXEL_FORMATS_ARB, 0x2000) \
	CONST(int, WGL_DRAW_TO_WINDOW_ARB, 0x2001) \
	CONST(int, WGL_DRAW_TO_BITMAP_ARB, 0x2002) \
	CONST(int, WGL_ACCELERATION_ARB, 0x2003) \
	CONST(int, WGL_NEED_PALETTE_ARB, 0x2004) \
	CONST(int, WGL_NEED_SYSTEM_PALETTE_ARB, 0x2005) \
	CONST(int, WGL_SWAP_LAYER_BUFFERS_ARB, 0x2006) \
	CONST(int, WGL_SWAP_METHOD_ARB, 0x2007) \
	CONST(int, WGL_NUMBER_OVERLAYS_ARB, 0x2008) \
	CONST(int, WGL_NUMBER_UNDERLAYS_ARB, 0x2009) \
	CONST(int, WGL_TRANSPARENT_ARB, 0x200A) \
	CONST(int, WGL_TRANSPARENT_RED_VALUE_ARB, 0x2037) \
	CONST(int, WGL_TRANSPARENT_GREEN_VALUE_ARB, 0x2038) \
	CONST(int, WGL_TRANSPARENT_BLUE_VALUE_ARB, 0x2039) \
	CONST(int, WGL_TRANSPARENT_ALPHA_VALUE_ARB, 0x203A) \
	CONST(int, WGL_TRANSPARENT_INDEX_VALUE_ARB, 0x203B) \
	CONST(int, WGL_SHARE_DEPTH_ARB, 0x200C) \
	CONST(int, WGL_SHARE_STENCIL_ARB, 0x200D) \
	CONST(int, WGL_SHARE_ACCUM_ARB, 0x200E) \
	CONST(int, WGL_SUPPORT_GDI_ARB, 0x200F) \
	CONST(int, WGL_SUPPORT_OPENGL_ARB, 0x2010) \
	CONST(int, WGL_DOUBLE_BUFFER_ARB, 0x2011) \
	CONST(int, WGL_STEREO_ARB, 0x2012) \
	CONST(int, WGL_PIXEL_TYPE_ARB, 0x2013) \
	CONST(int, WGL_COLOR_BITS_ARB, 0x2014) \
	CONST(int, WGL_RED_BITS_ARB, 0x2015) \
	CONST(int, WGL_RED_SHIFT_ARB, 0x2016) \
	CONST(int, WGL_GREEN_BITS_ARB, 0x2017) \
	CONST(int, WGL_GREEN_SHIFT_ARB, 0x2018) \
	CONST(int, WGL_BLUE_BITS_ARB, 0x2019) \
	CONST(int, WGL_BLUE_SHIFT_ARB, 0x201A) \
	CONST(int, WGL_ALPHA_BITS_ARB, 0x201B) \
	CONST(int, WGL_ALPHA_SHIFT_ARB, 0x201C) \
	CONST(int, WGL_ACCUM_BITS_ARB, 0x201D) \
	CONST(int, WGL_ACCUM_RED_BITS_ARB, 0x201E) \
	CONST(int, WGL_ACCUM_GREEN_BITS_ARB, 0x201F) \
	CONST(int, WGL_ACCUM_BLUE_BITS_ARB, 0x2020) \
	CONST(int, WGL_ACCUM_ALPHA_BITS_ARB, 0x2021) \
	CONST(int, WGL_DEPTH_BITS_ARB, 0x2022) \
	CONST(int, WGL_STENCIL_BITS_ARB, 0x2023) \
	CONST(int, WGL_AUX_BUFFERS_ARB, 0x2024) \
	CONST(int, WGL_NO_ACCELERATION_ARB, 0x2025) \
	CONST(int, WGL_GENERIC_ACCELERATION_ARB, 0x2026) \
	CONST(int, WGL_FULL_ACCELERATION_ARB, 0x2027) \
	CONST(int, WGL_SWAP_EXCHANGE_ARB, 0x2028) \
	CONST(int, WGL_SWAP_COPY_ARB, 0x2029) \
	CONST(int, WGL_SWAP_UNDEFINED_ARB, 0x202A) \
	CONST(int, WGL_TYPE_RGBA_ARB, 0x202B) \
	CONST(int, WGL_TYPE_COLORINDEX_ARB, 0x202C) \
	FUNC(BOOL , wglGetPixelFormatAttribivARB, WGLGETPIXELFORMATATTRIBIVARB, (HDC hdc , int iPixelFormat , int iLayerPlane , UINT nAttributes , const int * piAttributes , int * piValues ), (hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues)) \
	FUNC(BOOL , wglGetPixelFormatAttribfvARB, WGLGETPIXELFORMATATTRIBFVARB, (HDC hdc , int iPixelFormat , int iLayerPlane , UINT nAttributes , const int * piAttributes , FLOAT * pfValues ), (hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues)) \
	FUNC(BOOL , wglChoosePixelFormatARB, WGLCHOOSEPIXELFORMATARB, (HDC hdc , const int * piAttribIList , const FLOAT * pfAttribFList , UINT nMaxFormats , int * piFormats , UINT * nNumFormats ), (hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats)) \
	END()
#else
#define EXTENSION_WGL_ARB_pixel_format(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_pixel_format_float
#define WGL_ARB_pixel_format_float 1
#define EXTENSION_WGL_ARB_pixel_format_float(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_pixel_format_float) \
	CONST(int, WGL_TYPE_RGBA_FLOAT_ARB, 0x21A0) \
	END()
#else
#define EXTENSION_WGL_ARB_pixel_format_float(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ARB_render_texture
#define WGL_ARB_render_texture 1
#define EXTENSION_WGL_ARB_render_texture(NAME, FUNC, CONST, END) \
	NAME(WGL_ARB_render_texture) \
	CONST(int, WGL_BIND_TO_TEXTURE_RGB_ARB, 0x2070) \
	CONST(int, WGL_BIND_TO_TEXTURE_RGBA_ARB, 0x2071) \
	CONST(int, WGL_TEXTURE_FORMAT_ARB, 0x2072) \
	CONST(int, WGL_TEXTURE_TARGET_ARB, 0x2073) \
	CONST(int, WGL_MIPMAP_TEXTURE_ARB, 0x2074) \
	CONST(int, WGL_TEXTURE_RGB_ARB, 0x2075) \
	CONST(int, WGL_TEXTURE_RGBA_ARB, 0x2076) \
	CONST(int, WGL_NO_TEXTURE_ARB, 0x2077) \
	CONST(int, WGL_TEXTURE_CUBE_MAP_ARB, 0x2078) \
	CONST(int, WGL_TEXTURE_1D_ARB, 0x2079) \
	CONST(int, WGL_TEXTURE_2D_ARB, 0x207A) \
	CONST(int, WGL_MIPMAP_LEVEL_ARB, 0x207B) \
	CONST(int, WGL_CUBE_MAP_FACE_ARB, 0x207C) \
	CONST(int, WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 0x207D) \
	CONST(int, WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 0x207E) \
	CONST(int, WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, 0x207F) \
	CONST(int, WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 0x2080) \
	CONST(int, WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, 0x2081) \
	CONST(int, WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, 0x2082) \
	CONST(int, WGL_FRONT_LEFT_ARB, 0x2083) \
	CONST(int, WGL_FRONT_RIGHT_ARB, 0x2084) \
	CONST(int, WGL_BACK_LEFT_ARB, 0x2085) \
	CONST(int, WGL_BACK_RIGHT_ARB, 0x2086) \
	CONST(int, WGL_AUX0_ARB, 0x2087) \
	CONST(int, WGL_AUX1_ARB, 0x2088) \
	CONST(int, WGL_AUX2_ARB, 0x2089) \
	CONST(int, WGL_AUX3_ARB, 0x208A) \
	CONST(int, WGL_AUX4_ARB, 0x208B) \
	CONST(int, WGL_AUX5_ARB, 0x208C) \
	CONST(int, WGL_AUX6_ARB, 0x208D) \
	CONST(int, WGL_AUX7_ARB, 0x208E) \
	CONST(int, WGL_AUX8_ARB, 0x208F) \
	CONST(int, WGL_AUX9_ARB, 0x2090) \
	FUNC(BOOL , wglBindTexImageARB, WGLBINDTEXIMAGEARB, (HPBUFFERARB hPbuffer , int iBuffer ), (hPbuffer, iBuffer)) \
	FUNC(BOOL , wglReleaseTexImageARB, WGLRELEASETEXIMAGEARB, (HPBUFFERARB hPbuffer , int iBuffer ), (hPbuffer, iBuffer)) \
	FUNC(BOOL , wglSetPbufferAttribARB, WGLSETPBUFFERATTRIBARB, (HPBUFFERARB hPbuffer , const int * piAttribList ), (hPbuffer, piAttribList)) \
	END()
#else
#define EXTENSION_WGL_ARB_render_texture(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_ATI_pixel_format_float
#define WGL_ATI_pixel_format_float 1
#define EXTENSION_WGL_ATI_pixel_format_float(NAME, FUNC, CONST, END) \
	NAME(WGL_ATI_pixel_format_float) \
	CONST(int, WGL_TYPE_RGBA_FLOAT_ATI, 0x21A0) \
	END()
#else
#define EXTENSION_WGL_ATI_pixel_format_float(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_create_context_es2_profile
#define WGL_EXT_create_context_es2_profile 1
#define EXTENSION_WGL_EXT_create_context_es2_profile(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_create_context_es2_profile) \
	CONST(int, WGL_CONTEXT_ES2_PROFILE_BIT_EXT, 0x00000004) \
	END()
#else
#define EXTENSION_WGL_EXT_create_context_es2_profile(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_depth_float
#define WGL_EXT_depth_float 1
#define EXTENSION_WGL_EXT_depth_float(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_depth_float) \
	CONST(int, WGL_DEPTH_FLOAT_EXT, 0x2040) \
	END()
#else
#define EXTENSION_WGL_EXT_depth_float(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_display_color_table
#define WGL_EXT_display_color_table 1
#define EXTENSION_WGL_EXT_display_color_table(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_display_color_table) \
	FUNC(GLboolean , wglCreateDisplayColorTableEXT, WGLCREATEDISPLAYCOLORTABLEEXT, (GLushort id ), (id)) \
	FUNC(GLboolean , wglLoadDisplayColorTableEXT, WGLLOADDISPLAYCOLORTABLEEXT, (const GLushort * table , GLuint length ), (table, length)) \
	FUNC(GLboolean , wglBindDisplayColorTableEXT, WGLBINDDISPLAYCOLORTABLEEXT, (GLushort id ), (id)) \
	FUNC(VOID , wglDestroyDisplayColorTableEXT, WGLDESTROYDISPLAYCOLORTABLEEXT, (GLushort id ), (id)) \
	END()
#else
#define EXTENSION_WGL_EXT_display_color_table(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_extensions_string
#define WGL_EXT_extensions_string 1
#define EXTENSION_WGL_EXT_extensions_string(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_extensions_string) \
	FUNC(const char * , wglGetExtensionsStringEXT, WGLGETEXTENSIONSSTRINGEXT, (void ), ()) \
	END()
#else
#define EXTENSION_WGL_EXT_extensions_string(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_framebuffer_sRGB
#define WGL_EXT_framebuffer_sRGB 1
#define EXTENSION_WGL_EXT_framebuffer_sRGB(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_framebuffer_sRGB) \
	CONST(int, WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT, 0x20A9) \
	END()
#else
#define EXTENSION_WGL_EXT_framebuffer_sRGB(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_make_current_read
#define WGL_EXT_make_current_read 1
#define EXTENSION_WGL_EXT_make_current_read(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_make_current_read) \
	CONST(int, ERROR_INVALID_PIXEL_TYPE_EXT, 0x2043) \
	FUNC(BOOL , wglMakeContextCurrentEXT, WGLMAKECONTEXTCURRENTEXT, (HDC hDrawDC , HDC hReadDC , HGLRC hglrc ), (hDrawDC, hReadDC, hglrc)) \
	FUNC(HDC , wglGetCurrentReadDCEXT, WGLGETCURRENTREADDCEXT, (void ), ()) \
	END()
#else
#define EXTENSION_WGL_EXT_make_current_read(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_multisample
#define WGL_EXT_multisample 1
#define EXTENSION_WGL_EXT_multisample(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_multisample) \
	CONST(int, WGL_SAMPLE_BUFFERS_EXT, 0x2041) \
	CONST(int, WGL_SAMPLES_EXT, 0x2042) \
	END()
#else
#define EXTENSION_WGL_EXT_multisample(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_pbuffer
#define WGL_EXT_pbuffer 1
#define EXTENSION_WGL_EXT_pbuffer(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_pbuffer) \
	CONST(int, WGL_DRAW_TO_PBUFFER_EXT, 0x202D) \
	CONST(int, WGL_MAX_PBUFFER_PIXELS_EXT, 0x202E) \
	CONST(int, WGL_MAX_PBUFFER_WIDTH_EXT, 0x202F) \
	CONST(int, WGL_MAX_PBUFFER_HEIGHT_EXT, 0x2030) \
	CONST(int, WGL_OPTIMAL_PBUFFER_WIDTH_EXT, 0x2031) \
	CONST(int, WGL_OPTIMAL_PBUFFER_HEIGHT_EXT, 0x2032) \
	CONST(int, WGL_PBUFFER_LARGEST_EXT, 0x2033) \
	CONST(int, WGL_PBUFFER_WIDTH_EXT, 0x2034) \
	CONST(int, WGL_PBUFFER_HEIGHT_EXT, 0x2035) \
	FUNC(HPBUFFEREXT , wglCreatePbufferEXT, WGLCREATEPBUFFEREXT, (HDC hDC , int iPixelFormat , int iWidth , int iHeight , const int * piAttribList ), (hDC, iPixelFormat, iWidth, iHeight, piAttribList)) \
	FUNC(HDC , wglGetPbufferDCEXT, WGLGETPBUFFERDCEXT, (HPBUFFEREXT hPbuffer ), (hPbuffer)) \
	FUNC(int , wglReleasePbufferDCEXT, WGLRELEASEPBUFFERDCEXT, (HPBUFFEREXT hPbuffer , HDC hDC ), (hPbuffer, hDC)) \
	FUNC(BOOL , wglDestroyPbufferEXT, WGLDESTROYPBUFFEREXT, (HPBUFFEREXT hPbuffer ), (hPbuffer)) \
	FUNC(BOOL , wglQueryPbufferEXT, WGLQUERYPBUFFEREXT, (HPBUFFEREXT hPbuffer , int iAttribute , int * piValue ), (hPbuffer, iAttribute, piValue)) \
	END()
#else
#define EXTENSION_WGL_EXT_pbuffer(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_pixel_format
#define WGL_EXT_pixel_format 1
#define EXTENSION_WGL_EXT_pixel_format(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_pixel_format) \
	CONST(int, WGL_NUMBER_PIXEL_FORMATS_EXT, 0x2000) \
	CONST(int, WGL_DRAW_TO_WINDOW_EXT, 0x2001) \
	CONST(int, WGL_DRAW_TO_BITMAP_EXT, 0x2002) \
	CONST(int, WGL_ACCELERATION_EXT, 0x2003) \
	CONST(int, WGL_NEED_PALETTE_EXT, 0x2004) \
	CONST(int, WGL_NEED_SYSTEM_PALETTE_EXT, 0x2005) \
	CONST(int, WGL_SWAP_LAYER_BUFFERS_EXT, 0x2006) \
	CONST(int, WGL_SWAP_METHOD_EXT, 0x2007) \
	CONST(int, WGL_NUMBER_OVERLAYS_EXT, 0x2008) \
	CONST(int, WGL_NUMBER_UNDERLAYS_EXT, 0x2009) \
	CONST(int, WGL_TRANSPARENT_EXT, 0x200A) \
	CONST(int, WGL_TRANSPARENT_VALUE_EXT, 0x200B) \
	CONST(int, WGL_SHARE_DEPTH_EXT, 0x200C) \
	CONST(int, WGL_SHARE_STENCIL_EXT, 0x200D) \
	CONST(int, WGL_SHARE_ACCUM_EXT, 0x200E) \
	CONST(int, WGL_SUPPORT_GDI_EXT, 0x200F) \
	CONST(int, WGL_SUPPORT_OPENGL_EXT, 0x2010) \
	CONST(int, WGL_DOUBLE_BUFFER_EXT, 0x2011) \
	CONST(int, WGL_STEREO_EXT, 0x2012) \
	CONST(int, WGL_PIXEL_TYPE_EXT, 0x2013) \
	CONST(int, WGL_COLOR_BITS_EXT, 0x2014) \
	CONST(int, WGL_RED_BITS_EXT, 0x2015) \
	CONST(int, WGL_RED_SHIFT_EXT, 0x2016) \
	CONST(int, WGL_GREEN_BITS_EXT, 0x2017) \
	CONST(int, WGL_GREEN_SHIFT_EXT, 0x2018) \
	CONST(int, WGL_BLUE_BITS_EXT, 0x2019) \
	CONST(int, WGL_BLUE_SHIFT_EXT, 0x201A) \
	CONST(int, WGL_ALPHA_BITS_EXT, 0x201B) \
	CONST(int, WGL_ALPHA_SHIFT_EXT, 0x201C) \
	CONST(int, WGL_ACCUM_BITS_EXT, 0x201D) \
	CONST(int, WGL_ACCUM_RED_BITS_EXT, 0x201E) \
	CONST(int, WGL_ACCUM_GREEN_BITS_EXT, 0x201F) \
	CONST(int, WGL_ACCUM_BLUE_BITS_EXT, 0x2020) \
	CONST(int, WGL_ACCUM_ALPHA_BITS_EXT, 0x2021) \
	CONST(int, WGL_DEPTH_BITS_EXT, 0x2022) \
	CONST(int, WGL_STENCIL_BITS_EXT, 0x2023) \
	CONST(int, WGL_AUX_BUFFERS_EXT, 0x2024) \
	CONST(int, WGL_NO_ACCELERATION_EXT, 0x2025) \
	CONST(int, WGL_GENERIC_ACCELERATION_EXT, 0x2026) \
	CONST(int, WGL_FULL_ACCELERATION_EXT, 0x2027) \
	CONST(int, WGL_SWAP_EXCHANGE_EXT, 0x2028) \
	CONST(int, WGL_SWAP_COPY_EXT, 0x2029) \
	CONST(int, WGL_SWAP_UNDEFINED_EXT, 0x202A) \
	CONST(int, WGL_TYPE_RGBA_EXT, 0x202B) \
	CONST(int, WGL_TYPE_COLORINDEX_EXT, 0x202C) \
	FUNC(BOOL , wglGetPixelFormatAttribivEXT, WGLGETPIXELFORMATATTRIBIVEXT, (HDC hdc , int iPixelFormat , int iLayerPlane , UINT nAttributes , int * piAttributes , int * piValues ), (hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues)) \
	FUNC(BOOL , wglGetPixelFormatAttribfvEXT, WGLGETPIXELFORMATATTRIBFVEXT, (HDC hdc , int iPixelFormat , int iLayerPlane , UINT nAttributes , int * piAttributes , FLOAT * pfValues ), (hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues)) \
	FUNC(BOOL , wglChoosePixelFormatEXT, WGLCHOOSEPIXELFORMATEXT, (HDC hdc , const int * piAttribIList , const FLOAT * pfAttribFList , UINT nMaxFormats , int * piFormats , UINT * nNumFormats ), (hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats)) \
	END()
#else
#define EXTENSION_WGL_EXT_pixel_format(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_pixel_format_packed_float
#define WGL_EXT_pixel_format_packed_float 1
#define EXTENSION_WGL_EXT_pixel_format_packed_float(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_pixel_format_packed_float) \
	CONST(int, WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT, 0x20A8) \
	END()
#else
#define EXTENSION_WGL_EXT_pixel_format_packed_float(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_EXT_swap_control
#define WGL_EXT_swap_control 1
#define EXTENSION_WGL_EXT_swap_control(NAME, FUNC, CONST, END) \
	NAME(WGL_EXT_swap_control) \
	FUNC(BOOL , wglSwapIntervalEXT, WGLSWAPINTERVALEXT, (int interval ), (interval)) \
	FUNC(int , wglGetSwapIntervalEXT, WGLGETSWAPINTERVALEXT, (void ), ()) \
	END()
#else
#define EXTENSION_WGL_EXT_swap_control(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_I3D_digital_video_control
#define WGL_I3D_digital_video_control 1
#define EXTENSION_WGL_I3D_digital_video_control(NAME, FUNC, CONST, END) \
	NAME(WGL_I3D_digital_video_control) \
	CONST(int, WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D, 0x2050) \
	CONST(int, WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D, 0x2051) \
	CONST(int, WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D, 0x2052) \
	CONST(int, WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D, 0x2053) \
	FUNC(BOOL , wglGetDigitalVideoParametersI3D, WGLGETDIGITALVIDEOPARAMETERSI3D, (HDC hDC , int iAttribute , int * piValue ), (hDC, iAttribute, piValue)) \
	FUNC(BOOL , wglSetDigitalVideoParametersI3D, WGLSETDIGITALVIDEOPARAMETERSI3D, (HDC hDC , int iAttribute , const int * piValue ), (hDC, iAttribute, piValue)) \
	END()
#else
#define EXTENSION_WGL_I3D_digital_video_control(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_I3D_gamma
#define WGL_I3D_gamma 1
#define EXTENSION_WGL_I3D_gamma(NAME, FUNC, CONST, END) \
	NAME(WGL_I3D_gamma) \
	CONST(int, WGL_GAMMA_TABLE_SIZE_I3D, 0x204E) \
	CONST(int, WGL_GAMMA_EXCLUDE_DESKTOP_I3D, 0x204F) \
	FUNC(BOOL , wglGetGammaTableParametersI3D, WGLGETGAMMATABLEPARAMETERSI3D, (HDC hDC , int iAttribute , int * piValue ), (hDC, iAttribute, piValue)) \
	FUNC(BOOL , wglSetGammaTableParametersI3D, WGLSETGAMMATABLEPARAMETERSI3D, (HDC hDC , int iAttribute , const int * piValue ), (hDC, iAttribute, piValue)) \
	FUNC(BOOL , wglGetGammaTableI3D, WGLGETGAMMATABLEI3D, (HDC hDC , int iEntries , USHORT * puRed , USHORT * puGreen , USHORT * puBlue ), (hDC, iEntries, puRed, puGreen, puBlue)) \
	FUNC(BOOL , wglSetGammaTableI3D, WGLSETGAMMATABLEI3D, (HDC hDC , int iEntries , const USHORT * puRed , const USHORT * puGreen , const USHORT * puBlue ), (hDC, iEntries, puRed, puGreen, puBlue)) \
	END()
#else
#define EXTENSION_WGL_I3D_gamma(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_I3D_genlock
#define WGL_I3D_genlock 1
#define EXTENSION_WGL_I3D_genlock(NAME, FUNC, CONST, END) \
	NAME(WGL_I3D_genlock) \
	CONST(int, WGL_GENLOCK_SOURCE_MULTIVIEW_I3D, 0x2044) \
	CONST(int, WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D, 0x2045) \
	CONST(int, WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D, 0x2046) \
	CONST(int, WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D, 0x2047) \
	CONST(int, WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D, 0x2048) \
	CONST(int, WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D, 0x2049) \
	CONST(int, WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D, 0x204A) \
	CONST(int, WGL_GENLOCK_SOURCE_EDGE_RISING_I3D, 0x204B) \
	CONST(int, WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D, 0x204C) \
	FUNC(BOOL , wglEnableGenlockI3D, WGLENABLEGENLOCKI3D, (HDC hDC ), (hDC)) \
	FUNC(BOOL , wglDisableGenlockI3D, WGLDISABLEGENLOCKI3D, (HDC hDC ), (hDC)) \
	FUNC(BOOL , wglIsEnabledGenlockI3D, WGLISENABLEDGENLOCKI3D, (HDC hDC , BOOL * pFlag ), (hDC, pFlag)) \
	FUNC(BOOL , wglGenlockSourceI3D, WGLGENLOCKSOURCEI3D, (HDC hDC , UINT uSource ), (hDC, uSource)) \
	FUNC(BOOL , wglGetGenlockSourceI3D, WGLGETGENLOCKSOURCEI3D, (HDC hDC , UINT * uSource ), (hDC, uSource)) \
	FUNC(BOOL , wglGenlockSourceEdgeI3D, WGLGENLOCKSOURCEEDGEI3D, (HDC hDC , UINT uEdge ), (hDC, uEdge)) \
	FUNC(BOOL , wglGetGenlockSourceEdgeI3D, WGLGETGENLOCKSOURCEEDGEI3D, (HDC hDC , UINT * uEdge ), (hDC, uEdge)) \
	FUNC(BOOL , wglGenlockSampleRateI3D, WGLGENLOCKSAMPLERATEI3D, (HDC hDC , UINT uRate ), (hDC, uRate)) \
	FUNC(BOOL , wglGetGenlockSampleRateI3D, WGLGETGENLOCKSAMPLERATEI3D, (HDC hDC , UINT * uRate ), (hDC, uRate)) \
	FUNC(BOOL , wglGenlockSourceDelayI3D, WGLGENLOCKSOURCEDELAYI3D, (HDC hDC , UINT uDelay ), (hDC, uDelay)) \
	FUNC(BOOL , wglGetGenlockSourceDelayI3D, WGLGETGENLOCKSOURCEDELAYI3D, (HDC hDC , UINT * uDelay ), (hDC, uDelay)) \
	FUNC(BOOL , wglQueryGenlockMaxSourceDelayI3D, WGLQUERYGENLOCKMAXSOURCEDELAYI3D, (HDC hDC , UINT * uMaxLineDelay , UINT * uMaxPixelDelay ), (hDC, uMaxLineDelay, uMaxPixelDelay)) \
	END()
#else
#define EXTENSION_WGL_I3D_genlock(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_I3D_image_buffer
#define WGL_I3D_image_buffer 1
#define EXTENSION_WGL_I3D_image_buffer(NAME, FUNC, CONST, END) \
	NAME(WGL_I3D_image_buffer) \
	CONST(int, WGL_IMAGE_BUFFER_MIN_ACCESS_I3D, 0x00000001) \
	CONST(int, WGL_IMAGE_BUFFER_LOCK_I3D, 0x00000002) \
	FUNC(LPVOID , wglCreateImageBufferI3D, WGLCREATEIMAGEBUFFERI3D, (HDC hDC , DWORD dwSize , UINT uFlags ), (hDC, dwSize, uFlags)) \
	FUNC(BOOL , wglDestroyImageBufferI3D, WGLDESTROYIMAGEBUFFERI3D, (HDC hDC , LPVOID pAddress ), (hDC, pAddress)) \
	FUNC(BOOL , wglAssociateImageBufferEventsI3D, WGLASSOCIATEIMAGEBUFFEREVENTSI3D, (HDC hDC , const HANDLE * pEvent , const LPVOID * pAddress , const DWORD * pSize , UINT count ), (hDC, pEvent, pAddress, pSize, count)) \
	FUNC(BOOL , wglReleaseImageBufferEventsI3D, WGLRELEASEIMAGEBUFFEREVENTSI3D, (HDC hDC , const LPVOID * pAddress , UINT count ), (hDC, pAddress, count)) \
	END()
#else
#define EXTENSION_WGL_I3D_image_buffer(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_I3D_swap_frame_lock
#define WGL_I3D_swap_frame_lock 1
#define EXTENSION_WGL_I3D_swap_frame_lock(NAME, FUNC, CONST, END) \
	NAME(WGL_I3D_swap_frame_lock) \
	FUNC(BOOL , wglEnableFrameLockI3D, WGLENABLEFRAMELOCKI3D, (void ), ()) \
	FUNC(BOOL , wglDisableFrameLockI3D, WGLDISABLEFRAMELOCKI3D, (void ), ()) \
	FUNC(BOOL , wglIsEnabledFrameLockI3D, WGLISENABLEDFRAMELOCKI3D, (BOOL * pFlag ), (pFlag)) \
	FUNC(BOOL , wglQueryFrameLockMasterI3D, WGLQUERYFRAMELOCKMASTERI3D, (BOOL * pFlag ), (pFlag)) \
	END()
#else
#define EXTENSION_WGL_I3D_swap_frame_lock(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_I3D_swap_frame_usage
#define WGL_I3D_swap_frame_usage 1
#define EXTENSION_WGL_I3D_swap_frame_usage(NAME, FUNC, CONST, END) \
	NAME(WGL_I3D_swap_frame_usage) \
	FUNC(BOOL , wglGetFrameUsageI3D, WGLGETFRAMEUSAGEI3D, (float * pUsage ), (pUsage)) \
	FUNC(BOOL , wglBeginFrameTrackingI3D, WGLBEGINFRAMETRACKINGI3D, (void ), ()) \
	FUNC(BOOL , wglEndFrameTrackingI3D, WGLENDFRAMETRACKINGI3D, (void ), ()) \
	FUNC(BOOL , wglQueryFrameTrackingI3D, WGLQUERYFRAMETRACKINGI3D, (DWORD * pFrameCount , DWORD * pMissedFrames , float * pLastMissedUsage ), (pFrameCount, pMissedFrames, pLastMissedUsage)) \
	END()
#else
#define EXTENSION_WGL_I3D_swap_frame_usage(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_copy_image
#define WGL_NV_copy_image 1
#define EXTENSION_WGL_NV_copy_image(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_copy_image) \
	FUNC(BOOL , wglCopyImageSubDataNV, WGLCOPYIMAGESUBDATANV, (HGLRC hSrcRC , GLuint srcName , GLenum srcTarget , GLint srcLevel , GLint srcX , GLint srcY , GLint srcZ , HGLRC hDstRC , GLuint dstName , GLenum dstTarget , GLint dstLevel , GLint dstX , GLint dstY , GLint dstZ , GLsizei width , GLsizei height , GLsizei depth ), (hSrcRC, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, hDstRC, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth)) \
	END()
#else
#define EXTENSION_WGL_NV_copy_image(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_float_buffer
#define WGL_NV_float_buffer 1
#define EXTENSION_WGL_NV_float_buffer(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_float_buffer) \
	CONST(int, WGL_FLOAT_COMPONENTS_NV, 0x20B0) \
	CONST(int, WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV, 0x20B1) \
	CONST(int, WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV, 0x20B2) \
	CONST(int, WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV, 0x20B3) \
	CONST(int, WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV, 0x20B4) \
	CONST(int, WGL_TEXTURE_FLOAT_R_NV, 0x20B5) \
	CONST(int, WGL_TEXTURE_FLOAT_RG_NV, 0x20B6) \
	CONST(int, WGL_TEXTURE_FLOAT_RGB_NV, 0x20B7) \
	CONST(int, WGL_TEXTURE_FLOAT_RGBA_NV, 0x20B8) \
	END()
#else
#define EXTENSION_WGL_NV_float_buffer(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_gpu_affinity
#define WGL_NV_gpu_affinity 1
#define EXTENSION_WGL_NV_gpu_affinity(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_gpu_affinity) \
	CONST(int, WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV, 0x20D0) \
	CONST(int, WGL_ERROR_MISSING_AFFINITY_MASK_NV, 0x20D1) \
	FUNC(BOOL , wglEnumGpusNV, WGLENUMGPUSNV, (UINT iGpuIndex , HGPUNV * phGpu ), (iGpuIndex, phGpu)) \
	FUNC(BOOL , wglEnumGpuDevicesNV, WGLENUMGPUDEVICESNV, (HGPUNV hGpu , UINT iDeviceIndex , PGPU_DEVICE lpGpuDevice ), (hGpu, iDeviceIndex, lpGpuDevice)) \
	FUNC(HDC , wglCreateAffinityDCNV, WGLCREATEAFFINITYDCNV, (const HGPUNV * phGpuList ), (phGpuList)) \
	FUNC(BOOL , wglEnumGpusFromAffinityDCNV, WGLENUMGPUSFROMAFFINITYDCNV, (HDC hAffinityDC , UINT iGpuIndex , HGPUNV * hGpu ), (hAffinityDC, iGpuIndex, hGpu)) \
	FUNC(BOOL , wglDeleteDCNV, WGLDELETEDCNV, (HDC hdc ), (hdc)) \
	END()
#else
#define EXTENSION_WGL_NV_gpu_affinity(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_multisample_coverage
#define WGL_NV_multisample_coverage 1
#define EXTENSION_WGL_NV_multisample_coverage(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_multisample_coverage) \
	CONST(int, WGL_COVERAGE_SAMPLES_NV, 0x2042) \
	CONST(int, WGL_COLOR_SAMPLES_NV, 0x20B9) \
	END()
#else
#define EXTENSION_WGL_NV_multisample_coverage(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_present_video
#define WGL_NV_present_video 1
#define EXTENSION_WGL_NV_present_video(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_present_video) \
	CONST(int, WGL_NUM_VIDEO_SLOTS_NV, 0x20F0) \
	FUNC(int , wglEnumerateVideoDevicesNV, WGLENUMERATEVIDEODEVICESNV, (HDC hDC , HVIDEOOUTPUTDEVICENV * phDeviceList ), (hDC, phDeviceList)) \
	FUNC(BOOL , wglBindVideoDeviceNV, WGLBINDVIDEODEVICENV, (HDC hDC , unsigned int uVideoSlot , HVIDEOOUTPUTDEVICENV hVideoDevice , const int * piAttribList ), (hDC, uVideoSlot, hVideoDevice, piAttribList)) \
	FUNC(BOOL , wglQueryCurrentContextNV, WGLQUERYCURRENTCONTEXTNV, (int iAttribute , int * piValue ), (iAttribute, piValue)) \
	END()
#else
#define EXTENSION_WGL_NV_present_video(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_render_depth_texture
#define WGL_NV_render_depth_texture 1
#define EXTENSION_WGL_NV_render_depth_texture(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_render_depth_texture) \
	CONST(int, WGL_BIND_TO_TEXTURE_DEPTH_NV, 0x20A3) \
	CONST(int, WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV, 0x20A4) \
	CONST(int, WGL_DEPTH_TEXTURE_FORMAT_NV, 0x20A5) \
	CONST(int, WGL_TEXTURE_DEPTH_COMPONENT_NV, 0x20A6) \
	CONST(int, WGL_DEPTH_COMPONENT_NV, 0x20A7) \
	END()
#else
#define EXTENSION_WGL_NV_render_depth_texture(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_render_texture_rectangle
#define WGL_NV_render_texture_rectangle 1
#define EXTENSION_WGL_NV_render_texture_rectangle(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_render_texture_rectangle) \
	CONST(int, WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV, 0x20A0) \
	CONST(int, WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV, 0x20A1) \
	CONST(int, WGL_TEXTURE_RECTANGLE_NV, 0x20A2) \
	END()
#else
#define EXTENSION_WGL_NV_render_texture_rectangle(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_swap_group
#define WGL_NV_swap_group 1
#define EXTENSION_WGL_NV_swap_group(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_swap_group) \
	FUNC(BOOL , wglJoinSwapGroupNV, WGLJOINSWAPGROUPNV, (HDC hDC , GLuint group ), (hDC, group)) \
	FUNC(BOOL , wglBindSwapBarrierNV, WGLBINDSWAPBARRIERNV, (GLuint group , GLuint barrier ), (group, barrier)) \
	FUNC(BOOL , wglQuerySwapGroupNV, WGLQUERYSWAPGROUPNV, (HDC hDC , GLuint * group , GLuint * barrier ), (hDC, group, barrier)) \
	FUNC(BOOL , wglQueryMaxSwapGroupsNV, WGLQUERYMAXSWAPGROUPSNV, (HDC hDC , GLuint * maxGroups , GLuint * maxBarriers ), (hDC, maxGroups, maxBarriers)) \
	FUNC(BOOL , wglQueryFrameCountNV, WGLQUERYFRAMECOUNTNV, (HDC hDC , GLuint * count ), (hDC, count)) \
	FUNC(BOOL , wglResetFrameCountNV, WGLRESETFRAMECOUNTNV, (HDC hDC ), (hDC)) \
	END()
#else
#define EXTENSION_WGL_NV_swap_group(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_vertex_array_range
#define WGL_NV_vertex_array_range 1
#define EXTENSION_WGL_NV_vertex_array_range(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_vertex_array_range) \
	FUNC(void * , wglAllocateMemoryNV, WGLALLOCATEMEMORYNV, (GLsizei size , GLfloat readfreq , GLfloat writefreq , GLfloat priority ), (size, readfreq, writefreq, priority)) \
	FUNC(void , wglFreeMemoryNV, WGLFREEMEMORYNV, (void * pointer ), (pointer)) \
	END()
#else
#define EXTENSION_WGL_NV_vertex_array_range(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_video_capture
#define WGL_NV_video_capture 1
#define EXTENSION_WGL_NV_video_capture(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_video_capture) \
	CONST(int, WGL_UNIQUE_ID_NV, 0x20CE) \
	CONST(int, WGL_NUM_VIDEO_CAPTURE_SLOTS_NV, 0x20CF) \
	FUNC(BOOL , wglBindVideoCaptureDeviceNV, WGLBINDVIDEOCAPTUREDEVICENV, (UINT uVideoSlot , HVIDEOINPUTDEVICENV hDevice ), (uVideoSlot, hDevice)) \
	FUNC(UINT , wglEnumerateVideoCaptureDevicesNV, WGLENUMERATEVIDEOCAPTUREDEVICESNV, (HDC hDc , HVIDEOINPUTDEVICENV * phDeviceList ), (hDc, phDeviceList)) \
	FUNC(BOOL , wglLockVideoCaptureDeviceNV, WGLLOCKVIDEOCAPTUREDEVICENV, (HDC hDc , HVIDEOINPUTDEVICENV hDevice ), (hDc, hDevice)) \
	FUNC(BOOL , wglQueryVideoCaptureDeviceNV, WGLQUERYVIDEOCAPTUREDEVICENV, (HDC hDc , HVIDEOINPUTDEVICENV hDevice , int iAttribute , int * piValue ), (hDc, hDevice, iAttribute, piValue)) \
	FUNC(BOOL , wglReleaseVideoCaptureDeviceNV, WGLRELEASEVIDEOCAPTUREDEVICENV, (HDC hDc , HVIDEOINPUTDEVICENV hDevice ), (hDc, hDevice)) \
	END()
#else
#define EXTENSION_WGL_NV_video_capture(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_video_out
#define WGL_NV_video_out 1
#define EXTENSION_WGL_NV_video_out(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_video_out) \
	CONST(int, WGL_BIND_TO_VIDEO_RGB_NV, 0x20C0) \
	CONST(int, WGL_BIND_TO_VIDEO_RGBA_NV, 0x20C1) \
	CONST(int, WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV, 0x20C2) \
	CONST(int, WGL_VIDEO_OUT_COLOR_NV, 0x20C3) \
	CONST(int, WGL_VIDEO_OUT_ALPHA_NV, 0x20C4) \
	CONST(int, WGL_VIDEO_OUT_DEPTH_NV, 0x20C5) \
	CONST(int, WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV, 0x20C6) \
	CONST(int, WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV, 0x20C7) \
	CONST(int, WGL_VIDEO_OUT_FRAME, 0x20C8) \
	CONST(int, WGL_VIDEO_OUT_FIELD_1, 0x20C9) \
	CONST(int, WGL_VIDEO_OUT_FIELD_2, 0x20CA) \
	CONST(int, WGL_VIDEO_OUT_STACKED_FIELDS_1_2, 0x20CB) \
	CONST(int, WGL_VIDEO_OUT_STACKED_FIELDS_2_1, 0x20CC) \
	END()
#else
#define EXTENSION_WGL_NV_video_out(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_NV_video_output
#define WGL_NV_video_output 1
#define EXTENSION_WGL_NV_video_output(NAME, FUNC, CONST, END) \
	NAME(WGL_NV_video_output) \
	FUNC(BOOL , wglGetVideoDeviceNV, WGLGETVIDEODEVICENV, (HDC hDC , int numDevices , HPVIDEODEV * hVideoDevice ), (hDC, numDevices, hVideoDevice)) \
	FUNC(BOOL , wglReleaseVideoDeviceNV, WGLRELEASEVIDEODEVICENV, (HPVIDEODEV hVideoDevice ), (hVideoDevice)) \
	FUNC(BOOL , wglBindVideoImageNV, WGLBINDVIDEOIMAGENV, (HPVIDEODEV hVideoDevice , HPBUFFERARB hPbuffer , int iVideoBuffer ), (hVideoDevice, hPbuffer, iVideoBuffer)) \
	FUNC(BOOL , wglReleaseVideoImageNV, WGLRELEASEVIDEOIMAGENV, (HPBUFFERARB hPbuffer , int iVideoBuffer ), (hPbuffer, iVideoBuffer)) \
	FUNC(BOOL , wglSendPbufferToVideoNV, WGLSENDPBUFFERTOVIDEONV, (HPBUFFERARB hPbuffer , int iBufferType , unsigned long * pulCounterPbuffer , BOOL bBlock ), (hPbuffer, iBufferType, pulCounterPbuffer, bBlock)) \
	FUNC(BOOL , wglGetVideoInfoNV, WGLGETVIDEOINFONV, (HPVIDEODEV hpVideoDevice , unsigned long * pulCounterOutputPbuffer , unsigned long * pulCounterOutputVideo ), (hpVideoDevice, pulCounterOutputPbuffer, pulCounterOutputVideo)) \
	END()
#else
#define EXTENSION_WGL_NV_video_output(NAME, FUNC, CONST, END)
#endif

#ifndef WGL_OML_sync_control
#define WGL_OML_sync_control 1
#define EXTENSION_WGL_OML_sync_control(NAME, FUNC, CONST, END) \
	NAME(WGL_OML_sync_control) \
	FUNC(BOOL , wglGetSyncValuesOML, WGLGETSYNCVALUESOML, (HDC hdc , INT64 * ust , INT64 * msc , INT64 * sbc ), (hdc, ust, msc, sbc)) \
	FUNC(BOOL , wglGetMscRateOML, WGLGETMSCRATEOML, (HDC hdc , INT32 * numerator , INT32 * denominator ), (hdc, numerator, denominator)) \
	FUNC(INT64 , wglSwapBuffersMscOML, WGLSWAPBUFFERSMSCOML, (HDC hdc , INT64 target_msc , INT64 divisor , INT64 remainder ), (hdc, target_msc, divisor, remainder)) \
	FUNC(INT64 , wglSwapLayerBuffersMscOML, WGLSWAPLAYERBUFFERSMSCOML, (HDC hdc , int fuPlanes , INT64 target_msc , INT64 divisor , INT64 remainder ), (hdc, fuPlanes, target_msc, divisor, remainder)) \
	FUNC(BOOL , wglWaitForMscOML, WGLWAITFORMSCOML, (HDC hdc , INT64 target_msc , INT64 divisor , INT64 remainder , INT64 * ust , INT64 * msc , INT64 * sbc ), (hdc, target_msc, divisor, remainder, ust, msc, sbc)) \
	FUNC(BOOL , wglWaitForSbcOML, WGLWAITFORSBCOML, (HDC hdc , INT64 target_sbc , INT64 * ust , INT64 * msc , INT64 * sbc ), (hdc, target_sbc, ust, msc, sbc)) \
	END()
#else
#define EXTENSION_WGL_OML_sync_control(NAME, FUNC, CONST, END)
#endif

#define ALL_EXTENSIONS(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_3DFX_multisample(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_3DL_stereo_control(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_AMD_gpu_association(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_buffer_region(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_create_context(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_create_context_profile(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_create_context_robustness(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_extensions_string(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_framebuffer_sRGB(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_make_current_read(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_multisample(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_pbuffer(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_pixel_format(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_pixel_format_float(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ARB_render_texture(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_ATI_pixel_format_float(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_create_context_es2_profile(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_depth_float(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_display_color_table(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_extensions_string(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_framebuffer_sRGB(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_make_current_read(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_multisample(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_pbuffer(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_pixel_format(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_pixel_format_packed_float(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_EXT_swap_control(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_I3D_digital_video_control(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_I3D_gamma(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_I3D_genlock(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_I3D_image_buffer(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_I3D_swap_frame_lock(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_I3D_swap_frame_usage(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_copy_image(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_float_buffer(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_gpu_affinity(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_multisample_coverage(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_present_video(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_render_depth_texture(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_render_texture_rectangle(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_swap_group(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_vertex_array_range(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_video_capture(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_video_out(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_NV_video_output(NAME, FUNC, CONST, END) \
	EXTENSION_WGL_OML_sync_control(NAME, FUNC, CONST, END) \

#define ONLY_VERSION MAX_VERSION_EXTENSIONS
#define VERSION_EXTENSIONS(NAME, FUNC, CONST, END) \

#define ARB_EXTENSIONS(NAME, FUNC, CONST, END) \

#define EXT_EXTENSIONS(NAME, FUNC, CONST, END) \

#define IMPORTANT_EXTENSIONS(NAME, FUNC, CONST, END) \
	MAX_VERSION_EXTENSIONS(NAME, FUNC, CONST, END) \

#define CRITICAL_EXTENSIONS(NAME, FUNC, CONST, END) \
	MAX_VERSION_EXTENSIONS(NAME, FUNC, CONST, END) \
